-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(rooms): cleanup edge case for 1hr ttl #3163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cursor review |
Greptile OverviewGreptile SummarySummaryThis PR addresses an edge case where a socket entry can expire via the 1-hour TTL before the corresponding room presence is cleaned up, leaving stale presence in rooms. The changes appear to add cleanup paths in the socket connection/workflow handlers and adjust the room managers/types/feature-flag configuration so that presence is removed when the underlying socket mapping is missing or has been evicted. Overall, the change fits into the existing socket/rooms architecture by extending the room Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant SocketHandlers as Socket Handlers
participant Rooms as Rooms Manager
participant Redis as Redis (sockets + presence)
Client->>SocketHandlers: Connect / Resume
SocketHandlers->>Redis: Read socket entry (TTL-backed)
alt socket entry present
SocketHandlers->>Rooms: Join / update presence
Rooms->>Redis: Write presence
else socket entry missing (expired by 1hr TTL)
SocketHandlers->>Rooms: Cleanup presence for stale socket
Rooms->>Redis: Remove presence + room membership
end
Client->>SocketHandlers: Workflow events
SocketHandlers->>Redis: Resolve socket entry
alt missing/expired
SocketHandlers->>Rooms: Cleanup stale presence
Rooms->>Redis: Remove presence
else present
SocketHandlers->>Rooms: Update presence
Rooms->>Redis: Persist presence
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 1 comment
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
If sockets entry got cleaned up by 1hr ttl -- room presence would not be cleaned.
Type of Change
Testing
Tested manually using redis cli
Checklist